router: sample.o rdwrthread.o sniffex.o 
	g++ -o router sample.o rdwrthread.o sniffex.o -lpthread -lpcap

sample.o: sample.cpp definitions.hpp
	g++ -g -c -Wall sample.cpp

rdwrthread.o: rdwrthread.cpp definitions.hpp
	g++ -g -c -Wall rdwrthread.cpp

sniffex.o: sniffex.cpp definitions.hpp
	g++ -g -c -Wall sniffex.cpp

clean:
	rm -f *.o *.bak router
